"""
@File    : Application.py
@Time    : 2019/8/29 14:55
@Author  : LiuFeiYu
@Email   : liufeiyu@sunrise.net
@Software: PyCharm
"""
# 主机地址
# jtgl - 交通管理
# lysh - 商户管理
_HOST = {
    "jtgl_host": "http://192.168.10.232:30050",
    "lysh_host": "http://192.168.10.25:8804/lysh",

}

# 测试环境接口地址
_API_URL_DEBUG = {
    "api_user_list": "/um/user/list",
    "api_user_company_list": "/um/company/list",
    "api_user_department_list": "/um/department/findByCompanyId",
    "api_user_role_id": "/um/role/findByUserId",
    "api_user_add": "/um/userRole/add",
    "api_user_logout": "/um/user/logout",
    "api_role_list": "/um/role/list",
    "api_merchant_info_add": "/merchant/save",
    "api_merchant_info_update": "/merchant/update",
    "api_merchant_info_select": "/merchant/select?id=",
    "api_merchant_info_delete": "/merchant/delete?id=",
    "api_integrity_select": "/merchant-integrity/list",
    "api_complaint_select": "/merchant-complaint-record/list",
    "api_inspect_report": "/inspect/report",
    "api_inspect_list": "/inspect/list",
    "api_inspect_select_id": "/inspect/select?id=",
    "api_inspect_warn_list": "/inspect/warn/list",
    "api_inspect_rectification_list": "/inspect/rectification/list",
    "api_inspect_complete_list": "/inspect/complete/list",
    "api_inspect_rectification": "/inspect/warn/rectification",
    "api_menu_select": "/um/menu/show",
    "api_menu_select_by_id": "/um/menu/findByUserId",
    "api_device_select": "/device",
    "api_road_add": "/road",
    "api_road_update": "/road",
    "api_road_delete": "/road",
    "api_road_select": "/road/page",
    "api_road_relation": "/road/relation",
    "api_road_important": "/road/important",
    "api_monitor_add": "/lastMile",
    "api_monitor_update": "/lastMile",
    "api_monitor_delete": "/lastMile",
    "api_monitor_select": "/lastMile/page",
    "api_monitor_relation": "/lastMile/relation",
    "api_monitor_home": "/lastMile/home?id=",
    "api_msg_add": "/msg/user",
    "api_msg_update": "/msg/user",
    "api_msg_delete": "/msg/user",
    "api_msg_select": "/msg/user",
    "api_msg_param_update": "/param",
    "api_msg_param_get": "/param/template",
    "api_alarm_add": "/traffic/alarm",
    "api_alarm_ignore": "/traffic/alarm",
    "api_send_msg": "/send/message",
    "api_send_msg_list": "/send/message/page",
    "api_send_msg_list_alarm": "/send/message/list",
    "api_send_msg_detail": "/send/message/detail",
    "api_industry_province": "/industry/province",
    "api_industry_city": "/industry/city",
    "api_area_points": "/common/area/points",
    "api_screen_list": "/induction/screen/list",
    "api_car_source_statistics": "/car/source/statistics",
    "api_car_source_top_ten": "/car/source/top/ten",
    "api_flow_object": "/flow/object",
    "api_flow_statistics": "/flow/statistics",
    "api_flow_real_time": "/flow/realTime",
    "api_traffic_statics_report": "/traffic/report",
    "api_traffic_statics_trend": "/traffic/trend",
    "api_traffic_statics_info_sub": "/traffic/road/real/time/info/sub",
    "api_traffic_statics_road_info": "/traffic/road/real/time/info",
    "api_traffic_statics_road_info_top5": "/traffic/road/real/time/info/top5",
    "api_traffic_statics_jam_top5": "/traffic/road/jam/time/top5",
    "api_traffic_statics_jam_ratio": "/traffic/road/real/time/jam/ratio",
    "api_traffic_statics_list": "/traffic/list",
    "api_user_log_page_select": "/log/page",
    "api_user_log_user_select": "/log/user",
    "api_user_log_model_select": "/log/model"
}

# 接口正确响应代码
_API_RESPONSE_CODE = {
    "jtgl": "00000000",
    "lysh": "06010000"
}

# allure接口测试等级(重要程度) blocker > critical > normal > minor > trivial
_API_LEVEL = {
    1: "trivial",
    2: "minor",
    3: "normal",
    4: "critical",
    5: "blocker"
}

# jira项目数据字典
_JIRA_PROJECT_DATA = {
    "PM": "11000",
    "jtgl": "10801",
    "HYDD": "10800",
    "LYYT": "10805",
    "JCPT": "10809",
    "LYJC": "10803",
    "LYDSJ": "10802",
    "LYXXFB": "10806",
    "LYTC": "10804",
    "lysh": "10807",
    "LYYX": "10808",
    "HYGL": "10900",
    "JZW": "10300",
    "FXYH": "10901",
    "TKTHJJCXT": "10700",
    "LEARN": "10600"
}

# assignee
_JIRA_ASSIGNEE_DATA = {
    "jtgl": "liuyindog",  # 刘银
    "lysh": "lijiafeng"  # 李家奉
}


def get_code(module_name):
    return _API_RESPONSE_CODE[module_name]


def get_project_id(module_name):
    return _JIRA_PROJECT_DATA[module_name]


def get_assignee(module_name):
    return _JIRA_ASSIGNEE_DATA[module_name]


if __name__ == "__main__":
    # print(_get_code('jtgl'))
    pass
